home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / osi / isode / vmsisode / vmsisode80_tar.Z / vmsisode80_tar / sockit / gccinclude / fastskeldef.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-24  |  2.7 KB  |  108 lines

  1. /*  macro definitions for fast/full-table  C/FTL programs generated by flex */
  2.  
  3. #include "flexskelcom.h"
  4.  
  5. #define YY_END_OF_BUFFER_CHAR 0
  6.  
  7. /* action number for "not an accepting state; back-track (not implemented)" */
  8. #define YY_BACK_TRACK 0
  9.  
  10. /* action number for end-of-buffer was seen */
  11. #define YY_END_OF_BUFFER -3
  12.  
  13. /* reinitializes everything except the current start condition.  The last
  14.  * input character is set to a newline so an initial beginning-of-line
  15.  * rule will match
  16.  */
  17. #define YY_FAST_INIT \
  18.     { \
  19.     yytext = yy_c_buf_p = &yy_ch_buf[1]; \
  20.     yyleng = 0; \
  21.     yy_hold_char = *yy_c_buf_p; \
  22.     }
  23.  
  24. /* done before the next pattern has been matched action
  25.  * change both of these if you change them at all!
  26.  */
  27. #define YY_DO_BEFORE_SCAN \
  28.     *yy_c_buf_p = yy_hold_char
  29. #define YY_DO_BEFORE_RESTART \
  30.     yy_hold_char = *yy_c_buf_p
  31.  
  32. /* done after the current pattern has been matched and before the
  33.  * corresponding action
  34.  */
  35. #define YY_DO_BEFORE_ACTION \
  36.     yytext = yy_b_buf_p; \
  37.     yyleng = YY_LENG; \
  38.     yy_hold_char = *yy_c_buf_p; \
  39.     *yy_c_buf_p = '\0'
  40.  
  41. /* returns the length of the matched text */
  42. #define YY_LENG (yy_c_buf_p - yy_b_buf_p)
  43.  
  44. #ifdef FLEX_FULL_TABLE
  45. #define YY_CS_TYPE int
  46. #else
  47. #define YY_CS_TYPE struct yy_trans_info *
  48. #endif
  49.  
  50. /* find starting state */
  51. #ifdef FLEX_FULL_TABLE
  52. #    define YY_FIND_START_STATE( x ) \
  53.         x = yy_start; \
  54.         if ( yy_b_buf_p[-1] == '\n' ) \
  55.         ++x
  56. #else
  57. #    define YY_FIND_START_STATE( x ) \
  58.         x = yy_state_ptr[yy_start]; \
  59.         if ( yy_b_buf_p[-1] == '\n' ) \
  60.         x = yy_state_ptr[yy_start + 1]
  61. #endif
  62.  
  63. /* get next jam state from packed table */
  64. #ifdef FLEX_FULL_TABLE
  65. #    define YY_FIND_NEXT_MATCH \
  66.         { \
  67.         register int yy_state_info; \
  68.         while ( (yy_state_info = n[yy_current_state][*yy_c_buf_p] ) != YY_JAM ) \
  69.         { \
  70.         yy_current_state = yy_state_info; \
  71.         YY_BACKTRACKING_ACTION \
  72.         yy_c_buf_p++; \
  73.         } \
  74.         }
  75. #else
  76. #    define YY_FIND_NEXT_MATCH \
  77.         for ( yy_c = *yy_c_buf_p; \
  78.           (yy_trans_info = &yy_current_state[yy_c])->v == yy_c; \
  79.           yy_c = *++yy_c_buf_p ) \
  80.         { \
  81.         yy_current_state += yy_trans_info->n; \
  82.         YY_BACKTRACKING_ACTION \
  83.         }
  84. #endif
  85.  
  86. #ifdef FLEX_FULL_TABLE
  87. #    define YY_FIND_ACTION( x ) x = l[yy_current_state]
  88. #else
  89. #    define YY_FIND_ACTION( x ) x = yy_current_state[-1].n
  90. #endif
  91.  
  92.  
  93. #ifdef FLEX_FULL_TABLE
  94. #    define YY_GET_NEXT_STATE yy_cur_state = n[yy_cur_state][*(yy_temp_char_ptr++)]
  95. #else
  96. #    define YY_GET_NEXT_STATE yy_cur_state += yy_cur_state[*(yy_temp_char_ptr++)].n
  97. #endif
  98.  
  99. #define EOB_ACT_RESTART_SCAN 2
  100. #define EOB_ACT_END_OF_FILE 3
  101. #define EOB_ACT_LAST_MATCH 4
  102.  
  103. #ifdef FLEX_FULL_TABLE
  104. #define YY_DECLARE_YY_CS_PARAM int *yy_current_state
  105. #else
  106. #define YY_DECLARE_YY_CS_PARAM struct yy_trans_info *yy_current_state
  107. #endif
  108.